package com.hbnu.reflect;

public class Person {
    private String username;
    private int age;

    public double salary;

    public String address;

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public Person(String username, int age) {
        this.username = username;
        this.age = age;
    }


    public Person() {

    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person{" +
                "username='" + username + '\'' +
                ", age=" + age +
                ", salary=" + salary +
                ", address='" + address + '\'' +
                '}';
    }

    public String getUsername() {
        return username;
    }




    //用以测试反射的四个方法
    public void method1(String username,int age) {
        System.out.println(username+"::"+age);
    }

    private String method2(String username,double salary) {
        return this.username;
    }

    private String method3(String address, double salary) {
        return address + salary;
    }

    private void method4() {
        System.out.println("无参无返回值的私有方法");
    }

}




